﻿using AutoMapper;
using ERP.Domain.CustomerSupplier;
using ERP.Domain.Processs;
using ERP.Domain.SalesManagement;
using ERP.Domain.Workorders;
using Sell.Api.Write.Application.Command.ContractCommand;
using Sell.Api.Write.Application.Command.CustomerCommand;
using Sell.Api.Write.Application.Command.GoodCommand;
using Sell.Api.Write.Application.Command.PhrasesCommand;
using Sell.Api.Write.Application.Command.Pro;
using Sell.Api.Write.Application.Command.SalesManagementCommand;
using Sell.Api.Write.Application.Command.SupplierCommand;
using Sell.Api.Write.Application.Command.WorkordersCommand;
using Sell.Api.Write.Application.CommandHandlers.CustomerCommadnHandlers;
using Sell.Api.Write.Application.CommandHandlers.SalesManagementCommandHandlers;

namespace Sell.Api.Write
{
    public class AutoMeppers : Profile
    {
        public AutoMeppers()
        {
            CreateMap<Customer, CustomerAddCommand>().ReverseMap();//客户管理添加
            CreateMap<Customer, CustomerUpdateCommand>().ReverseMap();//客户管理修改
            CreateMap<Supplier, SupplierAddCommand>().ReverseMap();//供应商管理添加
            CreateMap<Supplier, SupplierUpdateCommand>().ReverseMap();//供应商管理修改
            CreateMap<Verification, VerificationAddCommand>().ReverseMap();//采购核价添加
            CreateMap<Verification, VerificationUpdatelCommand>().ReverseMap();//采购核价修改
            CreateMap<Contract, ContractAddCommand>().ReverseMap();//采购合同添加
            CreateMap<Contract, ContractUpdateCommand>().ReverseMap();//采购合同修改
            CreateMap<Phrase, PhrasesAddCommand>().ReverseMap();//销售合同添加
            CreateMap<Phrase, PhrasesUpdateCommand>().ReverseMap();//销售合同修改
            CreateMap<PSrocess, IProAddCommand>().ReverseMap();//工序管理添加
            CreateMap<PSrocess, IProUpdateCommand>().ReverseMap();//工序管理修改
            CreateMap<ProcessFlow, FlowAddCommand>().ReverseMap();//工艺流程添加
            CreateMap<ProcessFlow, FlowUpdateCommand>().ReverseMap();//工艺流程修改
            CreateMap<Workorder, WorkorderAddCommand>().ReverseMap();//生产工单添加
            CreateMap<Good, GoodAddCommand>().ReverseMap();//货品信息添加
            CreateMap<Good, GoodUpdateCommand>().ReverseMap();//货品信息修改
        }
    }
}